﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GameEngine.View.Components;
using GameEngine.Clients.Silverlight.View.Components;

namespace SilverlightShowCase.View.Components
{
    public partial class EditorLevelUC : UserControl, ISilverlightLevelView
    {
        public EditorLevelUC()
        {
            InitializeComponent();
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) });
        }

        public void SetWorldViews(List<WorldUC> worlds)
        {
            LayoutRoot.Children.Clear();
            LayoutRoot.RowDefinitions.Clear();
            //int i = 0;
            //foreach (WorldUC world in worlds) {
            //    LayoutRoot.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) });
            //    world.SetValue(Grid.RowProperty, i); 
            //    world.SetValue(Grid.ColumnProperty, 0);
            //    LayoutRoot.Children.Add(world);
            //    i++;
            //}
        }
    }
}
